package com.example.mapstruct.convert;

import com.example.mapstruct.enums.DisableStatus;
import com.example.mapstruct.enums.LevelEnum;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.ValueMapping;
import org.mapstruct.ValueMappings;

//@Mapper
public interface TestMapper {

    @ValueMappings({
            @ValueMapping(source = "able_status", target = "PERFECT"),
            @ValueMapping(source = MappingConstants.NULL, target = "PASS"),
            @ValueMapping(source = "failed_status", target = MappingConstants.NULL),
            @ValueMapping(source = MappingConstants.ANY_REMAINING, target = "normal"),
    })
    LevelEnum toEnum(DisableStatus disableStatus);

}